﻿/**
 * @file guild_application_logic.h
 * @date 2021/05/25 19:30
 *
 * @author harrybao (harrybao@123u.com)
 *
 * @brief 公会申请逻辑
 *
 * @version v1.0.0
 *
 * @copyright Copyright © 2021 All Rights Reserved 上海欢乐互娱网络科技有限公司
 *
 * @par history:
 * <table>
 * <tr><th>Date                     <th>Version     <th>Author <th>Description
 * <tr><td>2021/05/25 19:30         <td>1.0.0       <td>harrybao
 * <td>创建初始版本
 * </table>
 */

#pragma once

#include "error/error_code.h"
#include "guild/guild.h"
#include "guild/module/guild_module_loader.hpp"

struct GuildModuleApplication;

namespace guild_service {

/**
 * @brief 公会申请逻辑类
 *
 */
class GuildApplicationLogic {
 private:
  /**
   * @brief Get the Guild Application object
   *
   * @param guild_id
   * @param application
   * @param ec
   * @return true
   * @return false
   */
  static bool GetGuildModuleApplication(const guild_id_type guild_id,
                                  GuildModuleApplication &application);

 public:
  /**
   * @brief Get the Guild Application object
   *
   * @param role_uuid
   * @param application
   * @param ec
   * @return true
   * @return false
   */
  static bool GetGuildModuleApplication(const role_uuid_type role_uuid,
                                  GuildModuleApplication &application,
                                  error_code &ec);
};

}  // namespace guild_service